<!--
 * @Author: your name
 * @Date: 2021-12-07 16:17:54
 * @LastEditTime: 2021-12-07 19:29:49
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \项目实战专高四\a1907\myapp\src\views\Home\index.vue
-->
<template>
    <div>
        <dl v-for="v in List" :key="v.id" @click="GetUp">
            <dt><img :src=v.url alt=""></dt>
            <dd>{{v.title}}</dd>
        </dl>
    </div>
</template>

<script>
import axios from "axios"
import "../../mock/index.js"
export default {
    data () {
        return {
            List:[]
        }
    },
    methods: {
      GetUp(id){
          this.$router.push(`/my/${id}`)
      }  
    },
    created () {
        axios.get("/List").then(resp=>{
            this.List=resp.data.list
            console.log(resp);
        })
    }
}
</script>